package com.api.shopapi.service.impl;

import com.api.shopapi.entity.MedicationSchedulingNight;
import com.api.shopapi.entity.dto.MedicationSchedulingNightDTO;
import com.api.shopapi.mapper.MedicationSchedulingNightMapper;
import com.api.shopapi.service.MedicationSchedulingNightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("MedicationSchedulingNightServiceImplOne")
public class MedicationSchedulingNightServiceImpl implements MedicationSchedulingNightService {
    @Autowired
    private MedicationSchedulingNightMapper medicationSchedulingNightMapper;


    @Override
    public int insert(MedicationSchedulingNight medicationSchedulingNight) {
        return medicationSchedulingNightMapper.insert(medicationSchedulingNight);
    }

    @Override
    public int updateByMedicationSchedulingNightCode(MedicationSchedulingNight medicationSchedulingNight) {
        return medicationSchedulingNightMapper.updateByMedicationSchedulingNightCode(medicationSchedulingNight);
    }

    @Override
    public int deleteByMedicationSchedulingNightCode(String medicationSchedulingNightCode) {
        return medicationSchedulingNightMapper.deleteByMedicationSchedulingNightCode(medicationSchedulingNightCode);
    }

    @Override
    public MedicationSchedulingNight getByMedicationSchedulingNightCode(String medicationSchedulingNightCode) {
        return medicationSchedulingNightMapper.getByMedicationSchedulingNightCode(medicationSchedulingNightCode);
    }

    @Override
    public MedicationSchedulingNightDTO getByMedicationSchedulingCode(String medicationSchedulingCode) {
        return medicationSchedulingNightMapper.getByMedicationSchedulingCode(medicationSchedulingCode);
    }
}
